Enable HACS zip_release packaging with validated release asset#74
Conversation
Summary of ChangesHello @eXPerience83, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on improving the release packaging process for the 'Pollen Levels' custom component to ensure compatibility and reliable installation via HACS. It introduces automated workflows for building, validating, and publishing the component as a ZIP archive, enhancing the user experience and simplifying the installation process. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates hacs.json to enable zip_release packaging for HACS. The changes are straightforward, but I've found one issue regarding JSON formatting. A trailing comma has been added, which makes the JSON invalid according to the strict standard and could cause issues with some parsers. I've left a specific comment with a suggestion to fix this.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
User description
Motivation
Description
"zip_release": trueand"filename": "pollenlevels.zip"tohacs.jsonto enable release-asset installs..github/workflows/release.ymlwhich runs onrelease: types: [published], buildspollenlevels.zipcontainingcustom_components/pollenlevels/**, validates thatcustom_components/pollenlevels/manifest.jsonand__init__.pyexist and that all entries start withcustom_components/, and uploads/overwrites the asset usingsoftprops/action-gh-release@v2..github/workflows/package-test.ymlwhich isworkflow_dispatchonly, builds and validates the same ZIP, and uploads it as a CI artifact viaactions/upload-artifact@v4for pre-release verification.Testing
ruff check --fix --select I .andruff check ., both completed with no errors.black .formatting, which completed successfully.zip -r pollenlevels.zip custom_components/pollenlevelsand asserting inside Python that required paths exist and all zip entries start withcustom_components/, and the script printedokindicating validation passed.Codex Task
PR Type
Enhancement
Description
Add HACS
zip_releasesupport with validated ZIP packaging workflowsCreate release workflow that builds and uploads ZIP asset on publish
Create package-test workflow for pre-release ZIP validation
Implement ZIP structure validation ensuring integration-root layout
Update version to 1.9.4 and document packaging changes
Diagram Walkthrough
File Walkthrough
release.yml
Release workflow for HACS ZIP asset upload.github/workflows/release.yml
pollenlevels.zipfrom integration root directoryand correct layout
missing files
package-test.yml
Package test workflow for ZIP validation.github/workflows/package-test.yml
hacs.json
Enable HACS zip_release configurationhacs.json
zip_releasemode for HACS integrationpollenlevels.zipas the release asset filenamemanifest.json
Update integration version numbercustom_components/pollenlevels/manifest.json
pyproject.toml
Update project version numberpyproject.toml
CHANGELOG.md
Document version 1.9.4 release changesCHANGELOG.md
zip_releaseupgrade